package com.corpgovernment.organization.model.budget;

import com.corpgovernment.api.costcenter.model.CostCenter;
import com.corpgovernment.costcenter.entity.db.MbOrgProjectInfo;
import com.corpgovernment.organization.entity.db.budget.BudgetGroupEntity;
import com.corpgovernment.organization.entity.db.budget.BudgetItemEntity;
import com.corpgovernment.organization.entity.db.budget.BudgetNotifyEntity;
import com.corpgovernment.organization.entity.db.budget.BudgetRecordEntity;
import com.google.common.collect.Maps;
import lombok.Getter;
import lombok.Setter;

import java.util.List;
import java.util.Map;

@Getter
@Setter
public class BudgetDetailFuture {

    private Map<String, List<BudgetGroupEntity>> mapGroup;
    private Map<String, List<BudgetItemEntity>> mapItem;
    private Map<String, List<BudgetNotifyEntity>> mapNotify;
    private Map<String, List<BudgetRecordEntity>> mapRecord;
    private Map<String, CostCenter> mapCostCenter;

    private Map<String, MbOrgProjectInfo> mapProject;

    public void check() {
        if (mapGroup == null) {
            mapGroup = Maps.newHashMap();
        }
        if (mapItem == null) {
            mapItem = Maps.newHashMap();
        }
        if (mapNotify == null) {
            mapNotify = Maps.newHashMap();
        }
        if (mapRecord == null) {
            mapRecord = Maps.newHashMap();
        }
        if (mapCostCenter == null) {
            mapCostCenter = Maps.newHashMap();
        }
    }
}